package com.example.wowangz.rabbitmq.receive;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import com.example.wowangz.modules.user.model.User;

@Component
public class QueueReceiver {

	@RabbitHandler
	@RabbitListener(queues = "queue_one")
	public void processQueueOne(String msg) {
		System.out.println("queue_one receiver  : " + msg);
	}

	@RabbitHandler
	@RabbitListener(queues = "queue_two")
	public void processQueueTwo(User user) {
		System.out.println("queue_two receiver  : " + user);
	}

}
